// 补零操作
function addZero(arr, type = "/") {
    return arr.map(item => item > 9 ? item : "0" + item).join(type)
}

export function handeTime(time) {
    let myTime = new Date(time)
    let year = myTime.getFullYear()
    let month = myTime.getMonth() + 1
    let day = myTime.getDate()

    let hour = myTime.getHours()
    let min = myTime.getMinutes()
    let s = myTime.getSeconds()

    return addZero([year, month, day], "/") + " " + addZero([hour, min, s], ":")
}
